hello!
well I am under XP using VC++6.
So, I need to get the file size of a bunch of files into char[].
Code:
//Declaration of token:
char *token[512] = {0};
later
token holds all the file names I need.
The way for getting a file's size I use is:
Code:
WIN32_FILE_ATTRIBUTE_DATA wfad;
GetFileAttributesEx(TEXT("File.txt"), GetFileExInfoStandard, &wfad);
printf("Size of x.bat is %u\n", wfad.nFileSizeHigh);
but using a for loop doesnt work, it shows the very same value for every token[i].
so if I use:
Code:
//say the number of files is 16
for (int J=0;J<=15;J++)
{
WIN32_FILE_ATTRIBUTE_DATA wfad;
GetFileAttributesEx(TEXT(token[J]), GetFileExInfoStandard, &wfad);
printf("Size-> %u\n", wfad.nFileSizeHigh);
}//for
it will show the same number for all the token[J].
how can I store the file sizes in token[] to a char[]??? (lets name it FileSizes[])
also if anyone knows what is nFileSizeHigh and nFileSizeLow that would hel me understand better what's going on.
thanks a lot! =D